home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
10,000 Great Games
/
10,000 Great Games.iso
/
Product
/
66
/
data1.cab
/
Source_Files
/
Src
/
Initloop.cpp
< prev
next >
Wrap
C/C++ Source or Header
|
2000-01-16
|
646b
|
52 lines
#include "stdafx.h"
void init_game_loop()
{
// Pause game
cTimer::pause();
// Create level object
level = new cLevel();
// Reset used counters
cBMP::reset();
// Set background back to zero
reset_scrolling();
// The whole screen needs to be refreshed
cSurface::all_surfaces_dirty();
// Nobody finished level yet
first_at_end = 0;
// Reset score keeping
cScore::reset();
}
void deinit_game_loop()
{
// Stop music
stop_music();
// Deallocate level
kill_level();
// Delete level object
safe_delete(&level);
// Pause game
cTimer::pause();
}